Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
eslint-config-xo-space
Advanced tools
eslint-config-xo-space is an ESLint shareable configuration package that extends the XO code style with spaces instead of tabs. It is designed to enforce consistent coding styles and best practices in JavaScript projects by providing a set of predefined linting rules.
Enforcing Space Indentation
This feature enforces the use of spaces for indentation instead of tabs. By extending the 'xo-space' configuration, projects can maintain a consistent style that uses spaces, which is preferred in some coding standards.
{
"extends": "xo-space"
}
Predefined Linting Rules
The package provides a set of predefined linting rules that can be extended or overridden. This example shows how to enforce semicolons and single quotes, demonstrating how users can customize the rules to fit their project's needs.
{
"extends": "xo-space",
"rules": {
"semi": ["error", "always"],
"quotes": ["error", "single"]
}
}
eslint-config-airbnb is a popular ESLint configuration that enforces the Airbnb JavaScript style guide. It is similar to eslint-config-xo-space in that it provides a set of predefined rules for code style and best practices, but it follows the Airbnb style guide, which may differ in specific rules and preferences, such as using tabs or spaces.
eslint-config-standard is another widely used ESLint configuration that enforces JavaScript Standard Style. Like eslint-config-xo-space, it provides a set of rules for consistent code style, but it follows the Standard style guide, which has its own set of conventions and rules.
eslint-config-prettier is a configuration that turns off all rules that are unnecessary or might conflict with Prettier. While it doesn't enforce a specific style like eslint-config-xo-space, it is used to ensure that ESLint and Prettier can work together without conflicts, focusing more on formatting than style rules.
ESLint shareable config for XO with 2-space indent
This is for advanced users. You probably want to use XO directly.
$ npm install --save-dev eslint-config-xo-space
Add some ESLint config to your package.json
:
{
"name": "my-awesome-project",
"eslintConfig": {
"extends": "xo-space"
}
}
Or to .eslintrc
:
{
"extends": "xo-space"
}
Supports parsing ES2015+, but doesn't enforce it by default.
This package also exposes xo-space/esnext
if you want ES2015+ rules:
{
"extends": "xo-space/esnext"
}
And xo-space/browser
if you're in the browser:
{
"extends": "xo-space/browser"
}
MIT © Sindre Sorhus
FAQs
ESLint shareable config for XO with 2-space indent
The npm package eslint-config-xo-space receives a total of 140,415 weekly downloads. As such, eslint-config-xo-space popularity was classified as popular.
We found that eslint-config-xo-space demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.